﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Razor;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewEngines;
using ST.Torch.WebApi.Core.Extensions;
using Microsoft.EntityFrameworkCore.Metadata.Internal;


namespace ST.Torch.WebApi.Web.Entry.Areas.SYS.Controllers
{
    [Area("SYS")]
    [AppAuthorize]
    public class RoleController : Controller
    {
        public IActionResult Index()
        {
            return View();
        }
        public IActionResult AddOrEdit(string Id)
        {
            return View();
        }
        /// <summary>
        /// 分配菜单
        /// </summary>
        /// <returns></returns>
        public IActionResult AssignmentsMenu()
        {
            return View();
        }
        [HttpPost]
        public async Task<ActionResult> RenderViewToString([FromForm]string viewName, [FromForm]List<string> model=null)
        {
            string HtmlStr= await this.RenderViewToStringAsync(viewName, (object)model);
            return Content(HtmlStr);
        }
    }
}
